﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ZhimeiSoft.CharmManager.Server.DAL
{
    public class EmployeeDAL_Const
    {
        public static readonly string SQL_INSERT_EMPLOYEE = @"INSERT INTO EMPLOYEEINFO ( EMPLOYEENAME, ENAME, ECODE, ECARD, EBIRTHDAY, EADDRESS, 
                EMOBILEPHONE, EFAMLIYPHONE, EDUCATION, ENTRYDAY, EQUITDAY, ESTATE, EINDEXCODE, SALONID, EPASSWORD, ISRESERVERATION) VALUES 
            ( @EMPLOYEENAME, @ENAME, @ECODE, @ECARD, @EBIRTHDAY, @EADDRESS, @EMOBILEPHONE, @EFAMLIYPHONE, @EDUCATION, @ENTRYDAY, @EQUITDAY, @ESTATE, 
                @EINDEXCODE, @SALONID, @EPASSWORD, @ISRESERVERATION )";

        public static readonly string SQL_UPDATE_EMPLOYEE = @"UPDATE EMPLOYEEINFO SET EMPLOYEENAME = @EMPLOYEENAME, ENAME=@ENAME, ECODE=@ECODE
            , ECARD=@ECARD, EBIRTHDAY=@EBIRTHDAY, EADDRESS=@EADDRESS, EMOBILEPHONE=@EMOBILEPHONE
            , EFAMLIYPHONE=@EFAMLIYPHONE, EDUCATION=@EDUCATION, ENTRYDAY=@ENTRYDAY, EQUITDAY=@EQUITDAY
            , ESTATE=@ESTATE, EINDEXCODE=@EINDEXCODE, SALONID=@SALONID, EPASSWORD=@EPASSWORD, ISRESERVERATION = @ISRESERVERATION
            WHERE EMPLOYEEID=@EMPLOYEEID";

        public static readonly string SQL_DELETE_EMPLOYEE = @"DELETE FROM EMPLOYEEINFO WHERE EMPLOYEEID=@EMPLOYEEID";

        public static readonly string SQL_QUERY_EMPLOYEE_STATE = @"SELECT EMPLOYEEID, EMPLOYEENAME, ENAME, ECODE , ECODE + ' ' + ENAME AS EFULLNAME, ECARD ,EBIRTHDAY ,EADDRESS ,EMOBILEPHONE ,
            EFAMLIYPHONE ,EDUCATION ,ENTRYDAY ,EQUITDAY ,ESTATE , ISRESERVERATION, EINDEXCODE ,EMPLOYEEINFO.SALONID,EPASSWORD, SALONINFO.SNAME AS SALONNAME FROM  EMPLOYEEINFO, SALONINFO 
            WHERE EMPLOYEEINFO.SALONID=SALONINFO.SALONID AND EMPLOYEEINFO.ISRESERVERATION = 1 AND ESTATE = @ESTATE";

        public static readonly string SQL_QUERY_EMPLOYEE_ALL = @"SELECT EMPLOYEEID, EMPLOYEENAME, ENAME ,ECODE ,ECODE + ' ' + ENAME AS EFULLNAME, ECARD ,EBIRTHDAY ,EADDRESS ,EMOBILEPHONE ,
            EFAMLIYPHONE ,EDUCATION ,ENTRYDAY ,EQUITDAY ,ESTATE ,EINDEXCODE , ISRESERVERATION, EMPLOYEEINFO.SALONID,EPASSWORD, SALONINFO.SNAME AS SALONNAME FROM  EMPLOYEEINFO, SALONINFO
            WHERE EMPLOYEEINFO.SALONID=SALONINFO.SALONID AND EMPLOYEEINFO.ISRESERVERATION = 1";

        public static readonly string SQL_QUERY_EMPLOYEE = "SELECT * FROM EMPLOYEEINFO ";
    }
}
